package com.base.pd.agent;
/// <summary>
/// Base Agent class
/// </summary>
public abstract class Agent
{
    private String agent_name;
    private String author_name;
    
    public String getAuthor() { return author_name; }
    public void setAuthor(String value) { author_name = value; }
    public String getName() { return agent_name; }
    public void setName(String value) { agent_name = value; }

    /// <summary>
    /// Constructor
    /// </summary>
    /// <param name="name">name for the agent</param>
    /// <param name="author">name of the author / group</param>
    public Agent(String name, String author)
    {
    	this.setName(name);
        this.setAuthor(author);
    }

    /// <summary>
    /// Checks whether the agent chooses to cooperate or not in this round
    /// </summary>
    /// <returns>true, if the agent cooparates, false if he chooses to defect</returns>
    public abstract boolean cooperate();

    /// <summary>
    /// Update mechanism for the agent. The Arena will call this method after every round which gives the agent to keep track of the game.
    /// The agent decides whether and how he wants to store this information.
    /// </summary>
    /// <param name="round">round number</param>
    /// <param name="myMove">the agents own move</param>
    /// <param name="otherMove">the move of the other agent</param>
    /// <param name="myScore">score this move earned me</param>
    /// <param name="otherScore">score the other agent received for his move</param>
    public abstract void update(int round, boolean myMove, boolean otherMove, int myScore, int otherScore);

    /// <summary>
    /// Init method, that is called before each round.
    /// </summary>
    public abstract void init();
}
